package lock;

/*
    卖票案例
 */
public class SellTicketDemo {
    public static void main(String[] args) {
        SellTicket st = new SellTicket();
/*
多线程环境
有共享数据
多条语句操作共享语句
 */
//全部满足才会有数据安全问题
        Thread t1 = new Thread(st, "窗口1");
        Thread t2 = new Thread(st, "窗口2");
        Thread t3 = new Thread(st, "窗口3");

        t1.start();
        t2.start();
        t3.start();
    }
}
